#ifndef _CRT_ERROR_H
#define _CRT_ERROR_H

#include <crt_core.hpp>

#ifdef __cplusplus
extern "C" {
#endif

#include <errno.h>

#if (TARGET_OS == OS_WIN)
typedef DWORD crterr;
#elif (TARGET_OS == OS_POSIX)
typedef int crterr;
#elif (TARGET_OS == OS_MACH)
typedef int crterr;
#elif (TARGET_OS == OS_UNIX)
typedef int crterr;
#endif

void crt_setfatalerror(const crterr errorno);
crterr crt_geterror(void);

#ifdef __cplusplus
}
#endif

#endif
